import Vue from "vue";
import VueRouter from "vue-router";
import Layout from "@/views/layout/Index.vue";
import Home from "@/views/home/Home.vue";
import Login from "@/views/login/Index.vue";

Vue.use(VueRouter);

export const baseRoutes = [
  {
    path: "/",
    component: Layout,
    children: [
      {
        path: "home",
        name: "home",
        component: Home,
        meta: {
          title: "首页",
          isLogin: true,
        },
      },
    ],
  },
];

export const routes = [
  {
    path: "/login",
    name: "login",
    component: Login,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
